Skip to content

Conversation

liamse
Copy link
Contributor

@liamse liamse commented Dec 5, 2018

Sometimes it is required to get current time of recording in a moment. This method return an promise that can use like this:

import {AudioRecorder} from 'react-native-audio';
// ...
AudioRecorder.getCurrentTime().then(currentTime => {
    if (currentTime) {
        console.log('current Time', currentTime);
    } else {
        console.log('The recorder is not in progress');
    }
})

Add getCurrentTime method. This method returns a promise when audio is in recording. `onProgress` method return this value each 250 milliseconds. Sometimes you need to get it in a moment. This method can help you.
To connect JS to native side to run getCurrentTime method. This function return an promise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant